Unzip Action Icon

UnZip Files Action

Declaration

<AMUNZIPFILES ZIPFILE="text" DEST="text" OVERWRITE="yes/no" ISNEWER="yes/no" PASSWORD="text" EXCLUDE="text" ISNEWERTHAN="datetime" ISOLDERTHAN="datetime">

See Also

Unzip Action

Description

Decompresses files from the specified zip file into the destination folder specified. To specify more than one file to decompress use wildcards ( e.g. * or ? )

Practical Usage

Usually used to decompress files received from the Internet via email or FTP or when restoring from a backup.

Parameters

General Tab

Zip File(s)
Text, Required
MARKUP:
a) ZIPFILE="c:\sourcefoldername\zipfilename.zip"
b) ZIPFILE="c:\sourcefoldername\*.zip"

Specifies the file(s) to unzip (decompress). This parameter should be a fully qualified path and filename (preferred) or a single file (requires use of the Change Folder action). Wildcards ( e.g. *.* or ? ) may be used to unzip all files matching a certain mask.

Extract to Folder
Text, Required
MARKUP:DEST="c:\sourcefoldername\"
 

Specifies the destination folder for the file(s) being zipped. This should be a fully qualified path.

Options Tab

Restore Folder Structure
Yes/No, Optional default - YES
MARKUP: CREATEFOLDERS="NO"

When set to YES, specifies that, if present in source zip file, subfolders should be automatically created and files placed in their corresponding subfolders.

Overwrite if exist
Yes/No, Optional default - NO
MARKUP: OVERWRITE="YES"

When set to YES, specifies that, if matching file(s) already exist in the destination folder they should be overwritten.

Only if newer
Yes/No, Optional default - NO
MARKUP: ISNEWER="YES"

Valid only if the "Overwrite if exist" [OVERWRITE] parameter is YES. When set to YES, specifies that only matching files that are newer than those in the destination folder will be overwritten.

Password protect files
Text, Optional default - (none) no password
MARKUP: PASSWORD="mypassword"

If specified, uses this password to unzip a password protected zip file.

Exclude Mask
Text, Optional default - (blank)
MARKUP: EXCLUDE="*.txt"

Causes the action to not unzip files from the archive matching the mask(s) specified. Filenames or wildcard ( e.g. * or ? ) masks may be used, multiple entries may be specified by separating them with the | symbol (e.g. *.txt|*.bak)

Only if newer than
date, Optional default - (none)
MARKUP: ISNEWERTHAN="%DateSerial(2001,10,12) + TimeSerial(00,00,00)%"

Causes the action to unzip files from the archive only if the source is newer than the date/time specified. If parameter is left blank or not included, the date of the files will be ignored (excluding "Only if newer" [ISNEWER] parameter).

Only if older than
date, Optional default - (none)
MARKUP: ISOLDERTHAN="%DateSerial(2001,10,12) + TimeSerial(00,00,00)%"

Causes the action to unzip files from the archive if the source is older than the date/time specified. If parameter is left blank or not included, the date of the files will be ignored (excluding "Only if newer" [ISNEWER] parameter).

Notes

Standard Error Handling Options
This action also includes the standard "Error Causes" and "On Error" failure handling options/tabs

More on Error Handling Options

Variables and Expressions
All text fields allow the use of expressions by surrounding the expression in percentage signs (example: %MYVARIABLE%, %Left('Text',2)%). To help construct these expressions, a popup expression builder is available in all these fields by pressing F2.
More on variables...

More on expressions...

More on the expression builder...

Example

<AMUNZIPFILES ZIPFILE="C:\sourcefolder\sourcezipfile.zip" DEST="c:\targetfolder\">

<AMUNZIPFILES ZIPFILE="C:\sourcefolder\sourcezipfile.zip" DEST="c:\targetfolder\" OVERWRITE="YES" ISNEWER="YES" PASSWORD="ads" EXCLUDE="ads" ISNEWERTHAN="%DateSerial(2001,10,12) + TimeSerial(00,00,00)%" ISOLDERTHAN="%DateSerial(2001,10,12) + TimeSerial(00,00,00)%">